import 'dart:isolate';

import 'package:flutter/material.dart';

class MultiThreadPage extends StatefulWidget {
  const MultiThreadPage({Key? key}) : super(key: key);

  @override
  State<MultiThreadPage> createState() => _MultiThreadPageState();
}

class _MultiThreadPageState extends State<MultiThreadPage> {

@override
  void initState() {
    // TODO: implement initState
    multiThread();
    super.initState();
  }

  void multiThread(){
    // print("multiThread");
    // print("当前线程：${Isolate.current.debugName!}");
    // Isolate.spawn(newThread, "hello");
  }

  void newThread(String message){
    // print("当前线程：${Isolate.current.debugName!}");
    // print("message");
  }



  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Column(
        children: const [

        ],
      ),
    );
  }
}
